const {
  createProxyMiddleware
} = require('http-proxy-middleware');

module.exports = app => {
  // 代理
  app.use(
    '/health',
    createProxyMiddleware({
      // target: 'http://10.59.9.18/',
      target: 'http://172.27.6.139/api ',
      changeOrigin: true,
    })
  );
  app.use(
    '/auto',
    createProxyMiddleware({
      target: 'http://localhost:8000/',
      changeOrigin: true,
    })
  );
}
